/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package layer;

import event.SendEvent;
import event.StatusEvent;
import net.sf.appia.core.Layer;
import net.sf.appia.core.Session;
import net.sf.appia.core.events.channel.ChannelClose;
import net.sf.appia.core.events.channel.ChannelInit;
import net.sf.appia.protocols.common.RegisterSocketEvent;
import session.PerfectLinkSession;
import util.Constants;

/**
 *
 * @author Welington
 */
public class PerfectLinkLayer extends Layer{
     
    public PerfectLinkLayer() {
        Class [] provided = {};
        
        Class [] required = {
            SendEvent.class
        };
        
        Class [] accepted = {
            ChannelInit.class,
            ChannelClose.class,
            RegisterSocketEvent.class,
            SendEvent.class,
            StatusEvent.class
        };
        
        evProvide = Constants.fillClassVector(provided);
        evRequire = Constants.fillClassVector(required);
        evAccept  = Constants.fillClassVector(accepted);
    }

    @Override
    public Session createSession() {
        return new PerfectLinkSession(this);
    }
}
